<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Rewind the cursor to the first result</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mongodb-driver-cursor.next.html">« MongoDB\Driver\Cursor::next</a></li>
      <li style="float: right;"><a href="mongodb-driver-cursor.settypemap.html">MongoDB\Driver\Cursor::setTypeMap »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.mongodb-driver-cursor.html">MongoDB\Driver\Cursor</a></li>
    <li>Rewind the cursor to the first result</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="mongodb-driver-cursor.rewind" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoDB\Driver\Cursor::rewind</h1>
  <p class="verinfo">(mongodb &gt;=1.9.0)</p><p class="refpurpose"><span class="refname">MongoDB\Driver\Cursor::rewind</span> &mdash; <span class="dc-title">Rewind the cursor to the first result</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongodb-driver-cursor.rewind-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>MongoDB\Driver\Cursor::rewind</strong></span>(): <span class="type"><span class="type void">void</span></span></div>

  <p class="para rdfs-comment">
   If the cursor has advanced beyond its first position, it can no longer be
   rewound.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mongodb-driver-cursor.rewind-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongodb-driver-cursor.rewind-returnvalues">
  <h3 class="title">返回值</h3>  
  <p class="para">
   <strong><code>null</code></strong>.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-mongodb-driver-cursor.rewind-errors">
  <h3 class="title">错误／异常</h3>
  <ul class="simplelist">
   <li class="member">Throws <span class="classname"><a href="class.mongodb-driver-exception-invalidargumentexception.html" class="classname">MongoDB\Driver\Exception\InvalidArgumentException</a></span> on argument parsing errors.</li><li class="member">Throws <span class="classname"><a href="class.mongodb-driver-exception-connectionexception.html" class="classname">MongoDB\Driver\Exception\ConnectionException</a></span> if connection to the server fails (for reasons other than authentication).</li><li class="member">Throws <span class="classname"><a href="class.mongodb-driver-exception-authenticationexception.html" class="classname">MongoDB\Driver\Exception\AuthenticationException</a></span> if authentication is needed and fails.</li>
   <li class="member">Throws <span class="classname"><a href="class.mongodb-driver-exception-logicexception.html" class="classname">MongoDB\Driver\Exception\LogicException</a></span> if this method is called after the cursor has advanced beyond its first position.</li>
  </ul>
 </div>


 <div class="refsect1 seealso" id="refsect1-mongodb-driver-cursor.rewind-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><span class="methodname"><a href="iterator.rewind.html" class="methodname" rel="rdfs-seeAlso">Iterator::rewind()</a> - 返回到迭代器的第一个元素</span></li>
  </ul>
 </div>

</div></div></div></body></html>